<?php /* Smarty version Smarty-3.1.7, created on 2012-04-16 13:38:34
         compiled from ".\templates\comment_edit_input.tpl" */ ?>
<?php /*%%SmartyHeaderCode:243894f7bda0a145812-66136380%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '80e946fffc7aa76b7e3be953a8e32c21cae93a1d' => 
    array (
      0 => '.\\templates\\comment_edit_input.tpl',
      1 => 1334040393,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '243894f7bda0a145812-66136380',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.7',
  'unifunc' => 'content_4f7bda0a14aa3',
  'variables' => 
  array (
    'error_nickname_yn' => 0,
    'comment' => 0,
    'error_content_yn' => 0,
    'categorys' => 0,
    'k' => 0,
    'category' => 0,
    'tmpname' => 0,
    'error_photo_yn' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_4f7bda0a14aa3')) {function content_4f7bda0a14aa3($_smarty_tpl) {?><html>
<head>
<?php echo $_smarty_tpl->getSubTemplate ("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

</head>
<body>
<h1>SHONAN BBS 管理画面</h1>
<hr noshade size="1">
<div id="content">
  <div id="contentLeft">

    <h2>コメント編集画面</h2>
    <form action="./comment_edit_confirm.php"
          method="post"
          enctype="multipart/form-data">

    <div class="tblData">
    <table>
    <tr>
      <th>ニックネーム</th>
      <td>
      
<?php if ($_SESSION['tmpnickname']!=''||$_smarty_tpl->tpl_vars['error_nickname_yn']->value=="y"){?>
    <input type="text" name="nickname" size"20"
           value="<?php echo htmlspecialchars($_SESSION['tmpnickname'], ENT_QUOTES, 'UTF-8', true);?>
">
<?php }else{ ?>
    <input type="text" name="nickname" size="20"
           value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['comment']->value['nickname'], ENT_QUOTES, 'UTF-8', true);?>
">
<?php }?>
<?php if ($_smarty_tpl->tpl_vars['error_nickname_yn']->value=="y"){?>
<font color="red">ニックネームが空です</font>
<?php }?>
    </td>
  </tr>
  <tr>
    <th>内容</th>
  <td>
  <textarea name="content" cols="60" rows="10"><?php if ($_SESSION['tmpcontent']!=''||$_smarty_tpl->tpl_vars['error_content_yn']->value=="y"){?><?php echo $_SESSION['tmpcontent'];?>
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['comment']->value['content'];?>
<?php }?></textarea>
<?php if ($_smarty_tpl->tpl_vars['error_nickname_yn']->value=="y"){?>
<font color="red">コンテントが空です</font>
<?php }?>
    </td>
  </tr>
      <tr>
      <th>カテゴリ</th>
      <td>
<select name="category_id">
<?php  $_smarty_tpl->tpl_vars['category'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['category']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['categorys']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['category']->key => $_smarty_tpl->tpl_vars['category']->value){
$_smarty_tpl->tpl_vars['category']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['category']->key;
?>
<option value="<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
"
<?php if ($_SESSION['tmpcategory_id']!=''){?>
  <?php if ($_SESSION['tmpcategory_id']==$_smarty_tpl->tpl_vars['k']->value){?>selected="selected"<?php }?>
<?php }else{ ?>
  <?php if ($_smarty_tpl->tpl_vars['comment']->value['category_id']==$_smarty_tpl->tpl_vars['k']->value){?>selected="selected"<?php }?>
<?php }?>
>
<?php echo $_smarty_tpl->tpl_vars['category']->value;?>

</option>
<?php } ?>
</select>
    </td>
  </tr>
    <tr>
      <th>URL</th>
      <td>
      
<?php if ($_SESSION['tmpnickname']!=''){?>
    <input type="text" name="url" size"60"
           value="<?php echo htmlspecialchars($_SESSION['tmpurl'], ENT_QUOTES, 'UTF-8', true);?>
">
<?php }else{ ?>
    <input type="text" name="url" size="60"
           value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['comment']->value['url'], ENT_QUOTES, 'UTF-8', true);?>
">
<?php }?>
    </td>
  </tr>  <tr>
  <th>画像</th>
  <td>
  
<?php if ($_SESSION['tmpphoto']!=''){?>
    <img src="<?php echo $_SESSION['tmpphoto'];?>
" width="100"><br>
<?php }elseif($_smarty_tpl->tpl_vars['comment']->value['photo']!=''){?>
    <img src="../tmp/<?php echo $_smarty_tpl->tpl_vars['tmpname']->value;?>
" width="100"><br>
    <input type="hidden" name="tmpname" value="<?php echo $_smarty_tpl->tpl_vars['tmpname']->value;?>
">
<?php }?>
    <input type="file" name="photo">
<?php if ($_smarty_tpl->tpl_vars['error_photo_yn']->value=="y"){?>
<font color="red">画像ファイルではありません</font>
<?php }?>
    </td>
  </tr>
  </table>
  </div>
  <input type="hidden" name="comment_edit_input_id"
         value="<?php echo $_SESSION['comment_edit_input_id'];?>
">
  <input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['comment']->value['id'];?>
">
  <input type="submit" name="submit" value="確認する">
  </form>

  </div>
  <div id="contentRight">
<?php echo $_smarty_tpl->getSubTemplate ("menu.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

  </div>
</div>
<div class="clr"></div>
<?php echo $_smarty_tpl->getSubTemplate ("footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

</body>
</html><?php }} ?>